/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.client;

import org.testis.utils.WmiNetworkAdapters;
import java.util.HashMap;
import java.util.Set;

public class WmiAdaptersTest {

    public static void main(String[] args) throws Exception {
        WmiNetworkAdapters obj=new WmiNetworkAdapters();
        HashMap<String, String[]> output = obj.getAdapters();
        Set<String> keySet = output.keySet();
        String[] keys = keySet.toArray(new String[keySet.size()]);
        for (int i = 0; i < keys.length; i++) {
            System.out.println(keys[i].trim() + ":" + output.get(keys[i])[0].trim()+ ":" + output.get(keys[i])[1].trim());
            System.out.println("Setting Id:"+obj.getGuidByName( output.get(keys[i])[0].trim()) );
            System.out.println("Ip:"+obj.getNetworkAdapterIpByIndex( keys[i] ));
            System.out.println("Gateway:"+obj.getNetworkAdapterGateWayByIndex( keys[i] ));
            System.out.println("Subnet:"+obj.getNetworkAdapterSubnetByIndex( keys[i] ));
             System.out.println("Dns:"+obj.getNetworkAdapterDnsByIndex( keys[i] ));
              System.out.println("Mac:"+obj.getNetworkAdapterMacAddressByIndex( keys[i] ));
        }
    }
}

